import { createRouter, createWebHistory } from 'vue-router'

const routes = [
    {
        alias: ['/home'],
        path: '/',
        name: 'home',
        component: () => import('@/views/Home')
    },
    {
        alias: ['/publishArticle'],
        path: '/publishArticle/:id',
        name: 'publishArticle',
        component: () => import('@/views/PublishArticle')
    },
    {
        alias: ['/publishMinArticle'],
        path: '/publishMinArticle/:id',
        name: 'publishMinArticle',
        component: () => import('@/views/PublishMinArticle')
    },
    {
        path: '/workManage',
        name: 'workManage',
        component: () => import('@/views/WorkManage')
    },
    {
        path: '/permission',
        name: 'permission',
        component: () => import('@/views/Permission')
    },
    {
        path: '/role',
        name: 'role',
        component: () => import('@/views/Role')
    },
    {
        path: '/user',
        name: 'user',
        component: () => import('@/views/User')
    },
    {
        path: '/category',
        name: 'category',
        component: () => import('@/views/Category')
    },
]

const router = createRouter({
    history: createWebHistory('/back/'),
    routes
})

export default router
